package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 城区E学校维护表
 *
 * @author hhj
 * @since 2022-12-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_appoint_school")
@Schema(name = "EduAppointSchool", title = "城区E学校维护表", description = "城区E学校维护表实体类")
public class EduAppointSchool extends Model<EduAppointSchool> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "appointSchoolId", title = "城区E学校维护id")
    @TableId(value = "appoint_school_id", type = IdType.ASSIGN_ID)
    private String appointSchoolId;

    @Schema(name = "oldSchoolId", title = "原学校id")
    @TableField(value = "old_school_id")
    private String oldSchoolId;

    @Schema(name = "newSchoolId", title = "指定学校id")
    @TableField(value = "new_school_id")
    private String newSchoolId;

    @Schema(name = "year", title = "年份")
    @TableField(value = "year")
    private Integer year;

    @Schema(name = "status", title = "是否启用0.禁用1.启用")
    @TableField(value = "status")
    private String status;

    @Schema(name = "remark", title = "备注")
    @TableField(value = "remark")
    private String remark;

    @Schema(name = "del", title = "0,未删除,1,已删除")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Schema(name = "createName", title = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", title = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", title = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", title = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "areaCode", title = "行政区划")
    @TableField(value = "area_code")
    private String areaCode;

    @Override
    public Serializable pkVal() {
        return this.appointSchoolId;
    }
}
